package com.ruoyi.robot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.robot.mapper.ChatRobotSettingMapper;
import com.ruoyi.robot.domain.ChatRobotSetting;
import com.ruoyi.robot.service.IChatRobotSettingService;

/**
 * 机器人设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-15
 */
@Service
public class ChatRobotSettingServiceImpl implements IChatRobotSettingService 
{
    @Autowired
    private ChatRobotSettingMapper chatRobotSettingMapper;

    /**
     * 查询机器人设置
     * 
     * @param userId 机器人设置主键
     * @return 机器人设置
     */
    @Override
    public ChatRobotSetting selectChatRobotSettingByUserId(Long userId)
    {
        return chatRobotSettingMapper.selectChatRobotSettingByUserId(userId);
    }

    /**
     * 查询机器人设置列表
     * 
     * @param chatRobotSetting 机器人设置
     * @return 机器人设置
     */
    @Override
    public List<ChatRobotSetting> selectChatRobotSettingList(ChatRobotSetting chatRobotSetting)
    {
        return chatRobotSettingMapper.selectChatRobotSettingList(chatRobotSetting);
    }

    /**
     * 新增机器人设置
     * 
     * @param chatRobotSetting 机器人设置
     * @return 结果
     */
    @Override
    public int insertChatRobotSetting(ChatRobotSetting chatRobotSetting)
    {
        return chatRobotSettingMapper.insertChatRobotSetting(chatRobotSetting);
    }

    /**
     * 修改机器人设置
     * 
     * @param chatRobotSetting 机器人设置
     * @return 结果
     */
    @Override
    public int updateChatRobotSetting(ChatRobotSetting chatRobotSetting)
    {
        return chatRobotSettingMapper.updateChatRobotSetting(chatRobotSetting);
    }

    /**
     * 批量删除机器人设置
     * 
     * @param userIds 需要删除的机器人设置主键
     * @return 结果
     */
    @Override
    public int deleteChatRobotSettingByUserIds(Long[] userIds)
    {
        return chatRobotSettingMapper.deleteChatRobotSettingByUserIds(userIds);
    }

    /**
     * 删除机器人设置信息
     * 
     * @param userId 机器人设置主键
     * @return 结果
     */
    @Override
    public int deleteChatRobotSettingByUserId(Long userId)
    {
        return chatRobotSettingMapper.deleteChatRobotSettingByUserId(userId);
    }
}
